#ifndef ITEMDEF_H
#define ITEMDEF_H

#include <QMetaType>

// ListView item status
typedef enum _ItemStatus {
    S_RED,
    S_BLUE,
    S_YELLOW,
    S_GREEN,
    S_GRAY
} ItemStatus;

// ListView item data
struct ItemData{
    QString name;
    QString data;
};

typedef enum _TestStatus {
    E_TEST_NO_BEGIN,
    E_TEST_PROC,
    E_TEST_RES_SUCCESS,
    E_TEST_RES_FAIL,
    E_TEST_WAIT_JUDGE
} TestStatus;

typedef enum _ItemParseVal {
    E_PARSE_OK,
    E_PARSE_ERROR_FILE,
    E_PARSE_ERROR_ROOT,
    E_PARSE_ERROR_DATA
} ItemParseVal;

// descript test item
typedef struct _ItemDesc {
    QString name;
    QString type;
    QString command;
    QString exitCmd;
    QString info;
} ItemDesc;

typedef enum _TestingType {
    TT_NONE,
    TT_PREPARE,
    TT_AUTO,
    TT_HALFAUTO,
    TT_MANUAL,
    TT_EXIT
} TestingType;

Q_DECLARE_METATYPE(ItemData)

#endif // ITEMDEF_H
